package com.ntschy.taizhou.designpattern.装饰器模式1;

// 装饰器，用来扩展
public  class RobotDerector implements IRobot{
    private  IRobot robot;

    public RobotDerector(IRobot robot) {
        this.robot = robot;
    }
    public RobotDerector( ) {

    }

    @Override
    public void dosomeThing() {
        robot.dosomeThing();
    }

    public void mopfloor() {
        robot.dosomeThing();
        System.out.println("二代，扩展功能：拖地");
    }

}
